package net.jarang.android.saleoffline.activity;

import net.jarang.android.saleoffline.SaleContext;
import net.jarang.android.saleoffline.domain.appinfo.AppManager;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class LoginActivity extends Activity {
	private EditText loginIdET;
	private AppManager appManager;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.login);
        setTitle("로그인");
    	
        appManager = new AppManager(this);
        loginIdET = (EditText)findViewById(R.id.loginIdET);
        loginIdET.setText(SaleContext.myPhoneNo);
	}
	
	public void onClickLogin(View v) {
		appManager.updateLoginYn(true);
		Intent intent = new Intent(this, MainActivity.class);
    	startActivity(intent);
    	finish();
	}
	
    @Override
    public void onBackPressed() {
    	Intent intent = new Intent(this, MainActivity.class);
    	startActivity(intent);
    	finish();
    }	
}
